local Scraper = GameState:addState('Scraper')

function Scraper:enterState()
	local fs = MOAIFileSystem
	
	print("SCRAPER enter state")
	Game.state = "scraper"
	
	local path = fs:getRelativePath([[F:\irc_logs\]])
	
	
	print(fs:checkPathExists(path))
	print(path)
	local base_work_dir = fs:getWorkingDirectory()
	local a = fs:setWorkingDirectory(path)
	if a then a = "true" else a = "false" end
	print("WORKING DIR set : " .. a)
	print(fs:getWorkingDirectory())
	
	local files = fs:listFiles(path)
	
	for k, v in pairs(files) do
		local fk = files[k]:sub(1, 5)
		print(files[k])
		if fk == "#salt" then
			
			print("salt at ".. k)
		
		end
	
	end
	
end

function Scraper:exitState()
	
	print("SCRAPER exit state")

end